home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18169 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.6 KB

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: jkasunich@aol.com (JKasunich)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: 19 Apr 1996 00:18:22 -0400
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4l746e$m8r@newsbf02.news.aol.com>
  9. References: <3164B27B.71AC7F1E@dark.mountain.stronghold>
  10. Reply-To: jkasunich@aol.com (JKasunich)
  11. NNTP-Posting-Host: newsbf02.mail.aol.com
  12.  
  13.  
  14. Elsewhere in this thread, much has been said about how well,
  15. or how poorly, one language or another handles abstraction.
  16. My $0.02 on the subject:
  17.  
  18. Every programming language is an abstraction, they just operate
  19. at different levels.  I work on motor drives.  The highest level of
  20. abstraction for this product is what the customer sees:  a box
  21. with a START and STOP botton.  He pushes the buttons, and
  22. the motor spins.  He knows nothing else and is happy that way.
  23. Then you have the control engineer who sits next to me.  He 
  24. looks at the drive as a collection of algorithms that control the
  25. voltages, currents, and magnetic fields in the motor to make it
  26. generate torque.  His view is much more detailed than the
  27. customer's, but still much simpler than the code that implements
  28. those algorithms.  Next is the C code, followed by the assembly
  29. code that the compiler generates.  Next you have CPU, memory,
  30. I/O devices, and so on.  And below that, you have transistors and
  31. wires with voltages swinging from 0 volts to 5 volts and back.   
  32.  
  33. Each of these levels has its own 'best' language.  The customer
  34. looks at the instruction manual, the control engineer looks at
  35. functional block diagrams, the programmers look at C and
  36. sometimes assembly code, and the hardware designer looks at
  37. hardware block diagrams and schematic diagrams.
  38.  
  39. Arguments about which is the best level of abstraction are 
  40. pointless.  Any given problem may involve any or ALL of them.
  41. More than once, we have traced a problem seen by a customer
  42. down through the control algorithms, the code, and the hardware,
  43. to a difference of less than one volt, for a time period of less
  44. then 50 nanoseconds, on a wire at the lowest level of abstraction.
  45.  
  46. My main point:
  47.  
  48.      The best engineers are those who move easily from
  49.      one level of abstraction to another, and the best tools
  50.      are those that allow such movement.  Programming
  51.      languages are no exception.
  52.  
  53. The language should let you hide complexity at a lower level, but
  54. MUST NOT make it impossible to see that complexity when needed.
  55. One of the strengths of C is that you can easily make the transition
  56. to the next level down.  One of its weaknesses is that it is often
  57. difficult to make the transition to the next level up.  Since I do a 
  58. lot of troubleshooting, I would rather be able to move down.  If the
  59. problem can be solved by telling the customer to 'Read the manual,
  60. dummy', then fine.  If not, I look at the control algorithms.  If they
  61. are OK, I look at the C implementation, then either straight to the
  62. hardware, or maybe the assembly first, and so on down the line.
  63.  
  64. BTW, the main reason I hate Windows is that Bill G. and company
  65. apparently believe that the purpose of software is to conceal and 
  66. obfuscate what is going on at the lower levels.  Drives me nuts when
  67. something's broke and all I get is an error message intended for
  68. kindergarden kids.  Exactly the opposite of 'easy movement between
  69. levels of abstraction'.
  70.  
  71. OK, OK, so my $0.02 wound up being $20.00, sorry.  Thanks for
  72. the soapbox, perhaps I have given some food for thought.
  73.  
  74. John Kasunich
  75. ( Full time hardware engineer, part time programmer )
  76.  
  77.  
  78.